CALL 0_header.cmd
color 4f
if defined cookie goto :auto
goto :start

:auto
set cookie=done
goto :bootmgr

:start
ECHO ******************************** WARNING *****************************
ECHO. 
ECHO Configuring the BCD incorrectly can cause errors to the BootMGR
ECHO if you are not sure what you are doing please exit back to the
ECHO main menu.  This does not need to be ran when installing XP.
ECHO.
ECHO **********************************************************************
ECHO.
ECHO 1. Continue, I know what I am doing
ECHO 0. Go back to Main Menu  
ECHO.

set /p menu="%choice_text%"
if "%menu%" == "1" goto :bootmgr
if "%menu%" == "0" goto :imager

:break
goto :imager

:bootmgr
set DRIVE=W
ECHO Configuring the S: Boot Configuration Data
ECHO Setting Boot Record to %DRIVE%:\windows
ECHO Windows drive letter will change to c: after reboot
ECHO.

%DRIVE%:\windows\system32\bcdboot.exe %DRIVE%:\windows
ECHO.
ECHO check to see if this was successful, if it failed run:
ECHO %DRIVE%:\windows\system32\bcdboot.exe %DRIVE%:\windows /s %DRIVE%
goto wait

:wait
ECHO.
ECHO Returning to main menu
ECHO.
ping 127.0.0.1 -n 4 >nul
goto complete

:complete
REM setting the step changes the status on return to main menu
set step=done

:imager
0_main_menu.cmd

:end